package com.ibeeking.found.common.config.feign;

import com.ibeeking.found.common.config.feign.fallback.CpUserFallbackFactory;
import com.ibeeking.found.common.entity.UserInfoDTO;
import com.ibeeking.nematos.utils.result.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;

/**
 * @Author ibeeking
 */
@FeignClient(name = "base-upms-cp-server", contextId = "cpUserClient", path = "/cp", fallbackFactory = CpUserFallbackFactory.class, decode404 = true)
public interface CpUserClient {

    /**
     * 查询登录用户信息
     *
     * @return
     */
    @PostMapping(value = "/user/feign/v1/queryLoginUser/{userId}")
    ResponseResult<UserInfoDTO> queryLoginUser(@PathVariable("userId") Long userId);
}
